package com.sunqianhu.design_patterns_23.behavioral.state;

public class OnState implements State{
    public void pressSwitch(Light light) {
        System.out.println("电灯已关闭！");
        light.setState(new OffState()); // 切换到关闭状态
    }
}
